package com.example.serialize.impl;

import com.alibaba.fastjson.JSON;
import com.example.serialize.JobSerialize;

public class FastJSONJobSerialize implements JobSerialize {

    @Override
    public String decode(Object obj) {
        return JSON.toJSONString(obj);
    }

    @Override
    public Object encode(String obj, Class<?> clazz) {
        return JSON.parseObject(obj, clazz);
    }
}
